import service from "../../utils/request1";
import service2 from "../../utils/request2";
import service3 from "../../utils/request3";

export interface categoryModl {
  categoryId: string;
  categoryName: string;
}

export interface TagList {
  category: categoryModl[];
}

export interface hotWordResult {
  display_word: string;
  intro: string;
  word: string;
  shift: number;
  score: number;
}

export interface result2 {
  hotWordResultList: hotWordResult[];
}

export default {
  reqTagList() {
    return service.get<any, TagList>("/hotWordBillboardCategory");
  },

  reqTagList3(kw: string | undefined, paidFilter: boolean) {
    return service.get<any, any>(
      `/revision/suggest?kw=${kw}&paidFilter=${paidFilter}&scope=all`
    );
  },

  reqTagList4(kw: string, core: string, page: number, rows: number) {
    return service3.get<any, any>(
      `/m-revision/page/search?kw=${kw}&core=${core}&page=${page}&rows=${rows}`
    );
  },

  reqTagList2(categoryId: number, size: number) {
    return service2.get<any, result2>(
      `/jekoer/hotWordBillboard/list/2.0?categoryId=${categoryId}&size=${size}`
    );
  },
};
